﻿using System.Windows;
using Acme.MVVM.Scenarios.Views;
using Microsoft.Practices.Unity;
using Microsoft.Practices.Prism.UnityExtensions;
using Microsoft.Practices.Prism.Modularity;

namespace Acme.MVVM.Scenarios
{
    public class Bootstrapper : UnityBootstrapper
    {

        public Bootstrapper()
        {
        }

        protected override DependencyObject CreateShell()
        {
            ShellView shell = this.Container.Resolve<ShellView>();
            Application.Current.MainWindow = shell;
            Application.Current.MainWindow.Show();
            return shell;
        }

        protected override IModuleCatalog CreateModuleCatalog()
        {
            var catalog = new ModuleCatalog();
            catalog.AddModule(typeof(ScenarioModule));
            return catalog;
        }
    }
}
